package com.usian.comment.controller;

import com.usian.comment.service.ApCommentLikeService;
import com.usian.model.comment.dto.CommentLikeDto;
import com.usian.model.common.dtos.ResponseResult;
import comment.ApCommentLikeControllerApi;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/api/v1/apcommentlike")
public class ApCommentLikeController implements ApCommentLikeControllerApi {

    @Autowired
    private ApCommentLikeService apCommentLikeService;

    /**
     * 保存用户点赞数
     * @param dto
     * @return
     */
    @Override
    @PostMapping("/like")
    public ResponseResult saveLike(@RequestBody CommentLikeDto dto) {
        return apCommentLikeService.saveLike(dto);
    }
}
